$("#form_hotel input[type=text], #form_hotel select").removeClass("field-with-errors");
$("#form_hotel .error-message").html("").removeClass("red");

<% if @hotel.errors.any? %>
    <% flash[:alert] = ' Something missing, Please check again from STEP ONE!' %>
    $("#flash_message_wrapper").html("<%=j render partial: 'layouts/flash_messages' %>"); 
    $('#prerequisites').collapse('toggle');
    <% @hotel.errors.each do | field, message| %>
        $("#<%=j field.to_s %>_error").html("<%=j message %>").addClass("red");
    <% end %>
<% else %>
    $('#admin_title').html('Hotel Updated');
    $('#admin_content').html("<%= j render partial: 'hotels/hotel_created' %>");
<% end %>